import _ from 'underscore';
import React, { Component } from 'react';

export default class DefaultNoDataElement extends Component {
  render() {
    let currentStyle = {
      height: this.props.height,
      lineHeight: this.props.height + 'px'
    };
    return (
      <div className="default-nodata" style={ _.extend(currentStyle, this.props.style) }>
        {this.props.content}{this.props.children}
      </div>
    )
  }
}

DefaultNoDataElement.defaultProps = {
  height: 200,
  content: '暂无数据',
  style: {}
}
